// 角色用户相关类型
export interface PlatformUserRole {
  roleId?: number
  roleName?: string
}

// 用户管理相关类型
export interface UserType {
  platformUserId?: number
  username?: string
  password?: string
  name?: string
  email?: string
  phone?: string
  sex?: string
  state?: number
  createTime?: string
  roles?: PlatformUserRole[]
  ids?: number[]
}

// 角色管理相关类型
export interface RoleType {
  roleId?: number
  roleName?: string
  roleDescribe?: string
  username?: string
  name?: string
  sex?: string
  phone?: string
  password?: string
  email?: string
  avatar?: string
  token?: string
  state?: number
  project?: any
  createTime?: string
  updateTime?: string
  // 时间戳字段
  createTimeStamp?: number
  updateTimeStamp?: number
}

// 字典管理相关类型
export interface DictType {
  dictId?: number
  dictPid?: number | null
  dictName?: string
  dictDescribe?: string
  createTime?: string
  updateTime?: string
}

// 角色权限相关类型
export interface RolePermissionType {
  roleId?: number
  permissionIds?: number[]
  menus?: any[]
}

// 菜单管理相关类型
export interface TabsType {
  id?: number
  name?: string
  parentId?: number
  parentName?: string
  url?: string
  component?: string
  icon?: string
  status?: number
  sort?: number
  type?: number
  permission?: string
  createTime?: string
  updateTime?: string
}

export interface TabsTreeType extends TabsType {
  children?: TabsTreeType[]
}

// ====================商家菜单=====================
export interface BusinessPermissionType {
  permissionId?: number
  permissionPid?: number
  permissionName?: string
  permissionUri?: string
  permission?: string
  icon?: string
  describe?: string
  resourceType?: string
  sort?: number
  createTime?: string
  updateTime?: string
}

export interface BusinessPermissionTreeType extends BusinessPermissionType {
  childs?: BusinessPermissionTreeType[]
}

// =====================手机号管理===================
export interface UserUpdatePhoneParam {
  phone: string
  code: string
}

export interface UpdatePhoneResult {
  success: boolean
}

// =====================隐私验证码管理===================
export interface UserGetCodeParam {
  phone: string
  code?: string
}

export interface UserLoginParam {
  username: string
  code?: string
  password?: string
  rememberMe?: boolean
}
